package au.com.evoCoach.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

import au.com.evoCoach.enums.Position;

@Entity
public class PlayerForRound {
	private int id;
	private TeamPlayer teamPlayer;
	private Round round;
	private Position playerPosition;
	
	public PlayerForRound() {}
	
	@Id
	@GeneratedValue
	@Column
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	@Column(name = "position")
	@Enumerated(EnumType.STRING)
    public Position getPlayerPosition() {
        return playerPosition;
    }

    public void setPlayerPosition(Position playerPosition) {
        this.playerPosition = playerPosition;
    }
	
	@OneToOne
    @JoinColumn(name="round")
	public Round getRound() {
		return round;
	}
	
	public void setRound(Round round) {
		this.round = round;
	}
	
	@OneToOne
    @JoinColumn(name="playerId")
	public TeamPlayer getTeamPlayer() {
		return teamPlayer;
	}
	
	public void setTeamPlayer(TeamPlayer superCoachTeamPlayer) {
		this.teamPlayer = superCoachTeamPlayer;
	}
	
}
